package com.hxzy.shop.member.controller;

import com.hxzy.shop.member.dto.memberCard.req.MemberCardListsReq;
import com.hxzy.shop.member.service.MemberCardService;
import com.hxzy.shop.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author admin
 * @Desc
 * @Date 2023/8/3
 */
@RestController
@Api(tags = "会员中心-会员卡")
@RequestMapping("/member")
public class MemberCardController {

    @Autowired
    private MemberCardService memberCardService;

    /**
     * 获得会员卡列表
     *
     * @param req 会员请求体
     * @return 会员列表
     */
    @ApiOperation("会员卡列表")
    @PostMapping(value = "/memberCardLists")
    public Result<Map<String,Object>> memberCardLists(@RequestBody MemberCardListsReq req){
        Map<String,Object> map = memberCardService.memberCardLists(req);
        return Result.success(map);
    }

}
